﻿public static class GlobalMembersGame_tool
{

//	//* 测试写入 .data 文件 
//	internal static void test_write()
//	{
//		int i;
//		int class_id;
//		LCUI_Graph_[] graph = new LCUI_Graph_[5];

//		GameGraphRes_Init();
//		RandomNumbers.Seed((uint)time(null));
//		for(i =0; i<5; ++i)
//		{
//			Graph_Init(graph[i]);
//			Graph_Create(graph[i], 320, 240);
//			Graph_FillColor(graph[i], RGB(RandomNumbers.NextNumber()%255,RandomNumbers.NextNumber()%255,RandomNumbers.NextNumber()%255));
//		}
//		class_id = GameGraphRes_AddClass("main-resource");
//		GameGraphRes_AddGraph(class_id, "test-01", graph[0]);
//		GameGraphRes_AddGraph(class_id, "test-02", graph[1]);
//		GameGraphRes_AddGraph(class_id, "test-03", graph[2]);
//		GameGraphRes_AddGraph(class_id, "test-04", graph[3]);
//		GameGraphRes_AddGraph(class_id, "test-05", graph[4]);
//		GameGraphRes_WriteToFile("test.data", "main-resource");
//		GameGraphRes_FreeAll();
//	}

//	//* 测试读取 .data 文件 
//	internal static void test_read()
//	{
//		int i;
//		LCUI_Graph_[] graph = new LCUI_Graph_[5];
//		string filename = new string(new char[256]);

//		GameGraphRes_Init();
//		GameGraphRes_LoadFromFile("test.data");
//		GameGraphRes_GetGraph("main-resource", "test-01", graph[0]);
//		GameGraphRes_GetGraph("main-resource", "test-02", graph[1]);
//		GameGraphRes_GetGraph("main-resource", "test-03", graph[2]);
//		GameGraphRes_GetGraph("main-resource", "test-04", graph[3]);
//		GameGraphRes_GetGraph("main-resource", "test-05", graph[4]);
//		for(i =0; i<5; ++i)
//		{
//			filename = string.Format("test-{0:D2}.png", i);
//			Graph_WritePNG(filename, graph[i]);
//		}
//	}

//	//* 一堆资源文件信息，格式为：文件名  资源名 
	public static readonly fileinfo[] font_file_info = { new fileinfo("font-0.png", "0"), new fileinfo("font-1.png", "1"), new fileinfo("font-2.png", "2"), new fileinfo("font-3.png", "3"), new fileinfo("font-4.png", "4"), new fileinfo("font-5.png", "5"), new fileinfo("font-6.png", "6"), new fileinfo("font-7.png", "7"), new fileinfo("font-8.png", "8"), new fileinfo("font-9.png", "9"), new fileinfo("font-x.png", "x"), new fileinfo("red-font-digital-0.png", "red-0"), new fileinfo("red-font-digital-1.png", "red-1"), new fileinfo("red-font-digital-2.png", "red-2"), new fileinfo("red-font-digital-3.png", "red-3"), new fileinfo("red-font-digital-4.png", "red-4"), new fileinfo("red-font-digital-5.png", "red-5"), new fileinfo("red-font-digital-6.png", "red-6"), new fileinfo("red-font-digital-7.png", "red-7"), new fileinfo("red-font-digital-8.png", "red-8"), new fileinfo("red-font-digital-9.png", "red-9"), new fileinfo("green-font-digital-0.png", "red-0"), new fileinfo("green-font-digital-1.png", "red-1"), new fileinfo("green-font-digital-2.png", "red-2"), new fileinfo("green-font-digital-3.png", "red-3"), new fileinfo("green-font-digital-4.png", "red-4"), new fileinfo("green-font-digital-5.png", "red-5"), new fileinfo("green-font-digital-6.png", "red-6"), new fileinfo("green-font-digital-7.png", "red-7"), new fileinfo("green-font-digital-8.png", "red-8"), new fileinfo("green-font-digital-9.png", "red-9") };

	public static readonly fileinfo[] main_file_info = { new fileinfo("wave1.png", "front-wave-img"), new fileinfo("wave2.png", "back-wave-img"), new fileinfo("LC-GAMES-175x128.png", "main-logo"), new fileinfo("game-icon-64x64.png", "game-logo"), new fileinfo("bg.png", "background-image"), new fileinfo("avatar-unknown.png", "avatar-unknown"), new fileinfo("shadow.png", "shadow") };

	public static fileinfo scenes_file_info = new fileinfo("default-scene.png","default");

    	public static readonly fileinfo[] kuni_action_file_info = { new fileinfo("start-01.png", "start-01"), new fileinfo("start-02.png", "start-02"), new fileinfo("ready.png", "ready"), new fileinfo("stance.png", "stance"), new fileinfo("A-attack-01.png", "A-attack-01"), new fileinfo("A-attack-02.png", "A-attack-02"), new fileinfo("A-sprint-attack.png", "A-sprint-attack"), new fileinfo("A-sprint-jump-attack.png", "A-sprint-jump-attack"), new fileinfo("B-attack-01.png", "B-attack-01"), new fileinfo("B-attack-02.png", "B-attack-02"), new fileinfo("B-sprint-attack.png", "B-sprint-attack"), new fileinfo("back-be-catch.png", "back-be-catch"), new fileinfo("kick.png", "kick"), new fileinfo("catch.png", "catch"), new fileinfo("defense.png", "defense"), new fileinfo("defense++.png", "defense++"), new fileinfo("fall.png", "fall"), new fileinfo("final-blow-01.png", "final-blow-01"), new fileinfo("final-blow-02.png", "final-blow-02"), new fileinfo("final-blow-03.png", "final-blow-03"), new fileinfo("final-blow-04.png", "final-blow-04"), new fileinfo("hit.png", "hit"), new fileinfo("hit-fly.png", "hit-fly"), new fileinfo("hit-fly-fall.png", "hit-fly-fall"), new fileinfo("jump-elbow.png", "jump-elbow"), new fileinfo("squat.png", "squat"), new fileinfo("jump.png", "jump"), new fileinfo("lift-fall.png", "lift-fall"), new fileinfo("lift-jump.png", "lift-jump"), new fileinfo("lift-run.png", "lift-run"), new fileinfo("lift-walk-01.png", "lift-walk-01"), new fileinfo("lift-walk-02.png", "lift-walk-02"), new fileinfo("lift.png", "lift"), new fileinfo("tummy.png", "tummy"), new fileinfo("tummy-hit.png", "tummy-hit"), new fileinfo("tummy-hit-fly.png", "tummy-hit-fly"), new fileinfo("lying.png", "lying"), new fileinfo("lying-hit.png", "lying-hit"), new fileinfo("half-lying.png", "half-lying"), new fileinfo("pull.png", "pull"), new fileinfo("push.png", "push"), new fileinfo("rest-01.png", "rest-01"), new fileinfo("rest-02.png", "rest-02"), new fileinfo("roll-01.png", "roll-01"), new fileinfo("roll-02.png", "roll-02"), new fileinfo("roll-03.png", "roll-03"), new fileinfo("roll-04.png", "roll-04"), new fileinfo("roll-05.png", "roll-05"), new fileinfo("roll-06.png", "roll-06"), new fileinfo("roll-07.png", "roll-07"), new fileinfo("roll-08.png", "roll-08"), new fileinfo("run-01.png", "run-01"), new fileinfo("run-02.png", "run-02"), new fileinfo("run-03.png", "run-03"), new fileinfo("run-04.png", "run-04"), new fileinfo("run-05.png", "run-05"), new fileinfo("run-06.png", "run-06"), new fileinfo("walk-01.png", "walk-01"), new fileinfo("walk-03.png", "walk-03"), new fileinfo("weak-walk.png", "weak-walk"), new fileinfo("ride.png", "ride"), new fileinfo("ride-attack-01.png", "ride-attack-01"), new fileinfo("ride-attack-02.png", "ride-attack-02"), new fileinfo("be-push.png", "be-push"), new fileinfo("hug-front-put-01.png", "hug-front-put-01"), new fileinfo("hug-front-put-02.png", "hug-front-put-02"), new fileinfo("hug-front-put-03.png", "hug-front-put-03"), new fileinfo("hug-front-put-04.png", "hug-front-put-04"), new fileinfo("half-stance.png", "half-stance"), new fileinfo("sit.png", "sit") };

    	public static readonly fileinfo[] riki_action_file_info = { new fileinfo("start-01.png", "start-01"), new fileinfo("start-02.png", "start-02"), new fileinfo("A-attack-01.png", "A-attack-01"), new fileinfo("A-attack-02.png", "A-attack-02"), new fileinfo("A-sprint-attack-01.png", "A-sprint-attack-01"), new fileinfo("A-sprint-attack-02.png", "A-sprint-attack-02"), new fileinfo("B-attack-01.png", "B-attack-01"), new fileinfo("B-attack-02.png", "B-attack-02"), new fileinfo("B-sprint-attack-01.png", "B-sprint-attack-01"), new fileinfo("B-sprint-attack-02.png", "B-sprint-attack-02"), new fileinfo("back-be-catch.png", "back-be-catch"), new fileinfo("catch.png", "catch"), new fileinfo("defense.png", "defense"), new fileinfo("elbow-01.png", "elbow-01"), new fileinfo("elbow-02.png", "elbow-02"), new fileinfo("elbow-03.png", "elbow-03"), new fileinfo("elbow-04.png", "elbow-04"), new fileinfo("fall.png", "fall"), new fileinfo("final-blow-01.png", "final-blow-01"), new fileinfo("final-blow-02.png", "final-blow-02"), new fileinfo("final-blow-03.png", "final-blow-03"), new fileinfo("hit-fly.png", "hit-fly"), new fileinfo("hit.png", "hit"), new fileinfo("jump-elbow.png", "jump-elbow"), new fileinfo("jump-stomp.png", "jump-stomp"), new fileinfo("jump.png", "jump"), new fileinfo("lift-fall.png", "lift-fall"), new fileinfo("lift-jump.png", "lift-jump"), new fileinfo("lift-run-01.png", "lift-run-01"), new fileinfo("lift-run-02.png", "lift-run-02"), new fileinfo("lift-walk-01.png", "lift-walk-01"), new fileinfo("lift-walk-02.png", "lift-walk-02"), new fileinfo("lift-walk-03.png", "lift-walk-03"), new fileinfo("lift-walk-04.png", "lift-walk-04"), new fileinfo("lift.png", "lift"), new fileinfo("lying-hit.png", "lying-hit"), new fileinfo("lying.png", "lying"), new fileinfo("half-lying.png", "half-lying"), new fileinfo("pull.png", "pull"), new fileinfo("push.png", "push"), new fileinfo("ready-01.png", "ready-01"), new fileinfo("rest-01.png", "rest-01"), new fileinfo("rest-02.png", "rest-02"), new fileinfo("roll-01.png", "roll-01"), new fileinfo("roll-02.png", "roll-02"), new fileinfo("roll-03.png", "roll-03"), new fileinfo("roll-04.png", "roll-04"), new fileinfo("roll-05.png", "roll-05"), new fileinfo("roll-06.png", "roll-06"), new fileinfo("roll-07.png", "roll-07"), new fileinfo("roll-08.png", "roll-08"), new fileinfo("run-01.png", "run-01"), new fileinfo("run-02.png", "run-02"), new fileinfo("run-03.png", "run-03"), new fileinfo("run-04.png", "run-04"), new fileinfo("run-05.png", "run-05"), new fileinfo("run-06.png", "run-06"), new fileinfo("squat.png", "squat"), new fileinfo("stance-01.png", "stance-01"), new fileinfo("tummy-hit.png", "tummy-hit"), new fileinfo("tummy-hit-fly.png", "tummy-hit-fly"), new fileinfo("tummy.png", "tummy"), new fileinfo("walk-01.png", "walk-01"), new fileinfo("walk-02.png", "walk-02"), new fileinfo("walk-03.png", "walk-03"), new fileinfo("walk-04.png", "walk-04"), new fileinfo("weak-walk-01.png", "weak-walk-01"), new fileinfo("weak-walk-02.png", "weak-walk-02"), new fileinfo("ride.png", "ride"), new fileinfo("ride-attack-01.png", "ride-attack-01"), new fileinfo("ride-attack-02.png", "ride-attack-02"), new fileinfo("be-push.png", "be-push"), new fileinfo("defense++.png", "defense++"), new fileinfo("half-stance.png", "half-stance"), new fileinfo("sit.png", "sit") };

    //	public static readonly fileinfo[] mike_action_file_info = { new fileinfo("start-01.png", "start-01"), new fileinfo("start-02.png", "start-02"), new fileinfo("ready.png", "ready"), new fileinfo("stance.png", "stance"), new fileinfo("A-attack-01.png", "A-attack-01"), new fileinfo("A-attack-02.png", "A-attack-02"), new fileinfo("A-sprint-attack-01.png", "A-sprint-attack-01"), new fileinfo("A-sprint-attack-02.png", "A-sprint-attack-02"), new fileinfo("B-attack-01.png", "B-attack-01"), new fileinfo("B-attack-02.png", "B-attack-02"), new fileinfo("B-sprint-attack-01.png", "B-sprint-attack-01"), new fileinfo("B-sprint-attack-02.png", "B-sprint-attack-02"), new fileinfo("back-be-catch.png", "back-be-catch"), new fileinfo("kick.png", "kick"), new fileinfo("catch.png", "catch"), new fileinfo("defense.png", "defense"), new fileinfo("defense++.png", "defense++"), new fileinfo("fall.png", "fall"), new fileinfo("final-blow-01.png", "final-blow-01"), new fileinfo("final-blow-02.png", "final-blow-02"), new fileinfo("final-blow-03.png", "final-blow-03"), new fileinfo("final-blow-04.png", "final-blow-04"), new fileinfo("final-blow-05.png", "final-blow-05"), new fileinfo("hit.png", "hit"), new fileinfo("hit-fly.png", "hit-fly"), new fileinfo("hit-fly-fall.png", "hit-fly-fall"), new fileinfo("jump-elbow.png", "jump-elbow"), new fileinfo("squat.png", "squat"), new fileinfo("jump.png", "jump"), new fileinfo("lift-fall.png", "lift-fall"), new fileinfo("lift-jump.png", "lift-jump"), new fileinfo("lift-run.png", "lift-run"), new fileinfo("lift-walk-01.png", "lift-walk-01"), new fileinfo("lift-walk-02.png", "lift-walk-02"), new fileinfo("lift.png", "lift"), new fileinfo("tummy.png", "tummy"), new fileinfo("tummy-hit.png", "tummy-hit"), new fileinfo("tummy-hit-fly.png", "tummy-hit-fly"), new fileinfo("lying.png", "lying"), new fileinfo("lying-hit.png", "lying-hit"), new fileinfo("half-lying.png", "half-lying"), new fileinfo("pull.png", "pull"), new fileinfo("push.png", "push"), new fileinfo("rest-01.png", "rest-01"), new fileinfo("rest-02.png", "rest-02"), new fileinfo("roll-01.png", "roll-01"), new fileinfo("roll-02.png", "roll-02"), new fileinfo("roll-03.png", "roll-03"), new fileinfo("roll-04.png", "roll-04"), new fileinfo("roll-05.png", "roll-05"), new fileinfo("roll-06.png", "roll-06"), new fileinfo("roll-07.png", "roll-07"), new fileinfo("roll-08.png", "roll-08"), new fileinfo("run-01.png", "run-01"), new fileinfo("run-02.png", "run-02"), new fileinfo("run-03.png", "run-03"), new fileinfo("run-04.png", "run-04"), new fileinfo("run-05.png", "run-05"), new fileinfo("run-06.png", "run-06"), new fileinfo("walk-01.png", "walk-01"), new fileinfo("walk-02.png", "walk-02"), new fileinfo("weak-walk.png", "weak-walk"), new fileinfo("ride.png", "ride"), new fileinfo("ride-attack-01.png", "ride-attack-01"), new fileinfo("ride-attack-02.png", "ride-attack-02"), new fileinfo("be-push.png", "be-push"), new fileinfo("half-stance.png", "half-stance"), new fileinfo("hug-jump-01.png", "hug-jump-01"), new fileinfo("hug-jump-02.png", "hug-jump-02"), new fileinfo("hug-jump-03.png", "hug-jump-03"), new fileinfo("hug-jump-04.png", "hug-jump-04"), new fileinfo("sit.png", "sit") };

    //	public static readonly fileinfo[] toraji_action_file_info = { new fileinfo("start-01.png", "start-01"), new fileinfo("start-02.png", "start-02"), new fileinfo("ready.png", "ready"), new fileinfo("stance.png", "stance"), new fileinfo("half-lying.png", "half-lying"), new fileinfo("walk-01.png", "walk-01"), new fileinfo("walk-02.png", "walk-02"), new fileinfo("walk-03.png", "walk-03"), new fileinfo("walk-04.png", "walk-04"), new fileinfo("run-01.png", "run-01"), new fileinfo("run-02.png", "run-02"), new fileinfo("run-03.png", "run-03"), new fileinfo("run-04.png", "run-04"), new fileinfo("run-05.png", "run-05"), new fileinfo("run-06.png", "run-06"), new fileinfo("A-attack-01.png", "A-attack-01"), new fileinfo("A-attack-02.png", "A-attack-02"), new fileinfo("B-attack-01.png", "B-attack-01"), new fileinfo("B-attack-02.png", "B-attack-02"), new fileinfo("A-sprint-attack-01.png", "A-sprint-attack-01"), new fileinfo("A-sprint-attack-02.png", "A-sprint-attack-02"), new fileinfo("A-sprint-attack-03.png", "A-sprint-attack-03"), new fileinfo("A-sprint-attack-04.png", "A-sprint-attack-04"), new fileinfo("A-sprint-attack-05.png", "A-sprint-attack-05"), new fileinfo("A-sprint-attack-06.png", "A-sprint-attack-06"), new fileinfo("jump.png", "jump"), new fileinfo("squat.png", "squat"), new fileinfo("defense.png", "defense"), new fileinfo("hit-fly-fall.png", "hit-fly-fall"), new fileinfo("final-blow-01.png", "final-blow-01"), new fileinfo("final-blow-02.png", "final-blow-02"), new fileinfo("hit-fly.png", "hit-fly"), new fileinfo("hit.png", "hit"), new fileinfo("lying-hit.png", "lying-hit"), new fileinfo("lying.png", "lying"), new fileinfo("tummy.png", "tummy"), new fileinfo("tummy-hit.png", "tummy-hit"), new fileinfo("tummy-hit-fly.png", "tummy-hit-fly"), new fileinfo("stomp.png", "stomp"), new fileinfo("kick.png", "kick"), new fileinfo("roll-01.png", "roll-01"), new fileinfo("roll-02.png", "roll-02"), new fileinfo("roll-03.png", "roll-03"), new fileinfo("roll-04.png", "roll-04"), new fileinfo("roll-05.png", "roll-05"), new fileinfo("roll-06.png", "roll-06"), new fileinfo("roll-07.png", "roll-07"), new fileinfo("roll-08.png", "roll-08"), new fileinfo("spin-up-01.png", "spin-up-01"), new fileinfo("spin-up-02.png", "spin-up-02"), new fileinfo("spin-up-03.png", "spin-up-03"), new fileinfo("catch.png", "catch"), new fileinfo("B-sprint-attack.png", "B-sprint-attack"), new fileinfo("rest-01.png", "rest-01"), new fileinfo("rest-02.png", "rest-02"), new fileinfo("push.png", "push"), new fileinfo("pull.png", "pull"), new fileinfo("back-be-catch.png", "back-be-catch"), new fileinfo("weak-walk.png", "weak-walk"), new fileinfo("fall.png", "fall"), new fileinfo("defense++.png", "defense++"), new fileinfo("ride.png", "ride"), new fileinfo("ride-attack-01.png", "ride-attack-01"), new fileinfo("ride-attack-02.png", "ride-attack-02"), new fileinfo("lift-fall.png", "lift-fall"), new fileinfo("lift.png", "lift"), new fileinfo("lift-jump.png", "lift-jump"), new fileinfo("lift-run-01.png", "lift-run-01"), new fileinfo("lift-walk-01.png", "lift-walk-01"), new fileinfo("lift-walk-02.png", "lift-walk-02"), new fileinfo("lift-walk-03.png", "lift-walk-03"), new fileinfo("sit.png", "sit"), new fileinfo("jump-elbow.png", "jump-elbow"), new fileinfo("half-stance.png", "half-stance"), new fileinfo("be-push.png", "be-push") };

    //	public static readonly fileinfo[] ben_action_file_info = { new fileinfo("start-01.png", "start-01"), new fileinfo("start-02.png", "start-02"), new fileinfo("ready.png", "ready"), new fileinfo("stance.png", "stance"), new fileinfo("A-attack-01.png", "A-attack-01"), new fileinfo("A-attack-02.png", "A-attack-02"), new fileinfo("B-attack-01.png", "B-attack-01"), new fileinfo("B-attack-02.png", "B-attack-02"), new fileinfo("B-attack-03.png", "B-attack-03"), new fileinfo("back-be-catch-01.png", "back-be-catch-01"), new fileinfo("back-be-catch-02.png", "back-be-catch-02"), new fileinfo("kick.png", "kick"), new fileinfo("catch.png", "catch"), new fileinfo("defense.png", "defense"), new fileinfo("defense++.png", "defense++"), new fileinfo("final-blow-01.png", "final-blow-01"), new fileinfo("final-blow-02.png", "final-blow-02"), new fileinfo("final-blow-03.png", "final-blow-03"), new fileinfo("final-blow-04.png", "final-blow-04"), new fileinfo("final-blow-05.png", "final-blow-05"), new fileinfo("final-blow-06.png", "final-blow-06"), new fileinfo("hit.png", "hit"), new fileinfo("hit-fly.png", "hit-fly"), new fileinfo("hit-fly-fall.png", "hit-fly-fall"), new fileinfo("jump-elbow.png", "jump-elbow"), new fileinfo("squat.png", "squat"), new fileinfo("jump.png", "jump"), new fileinfo("fall.png", "fall"), new fileinfo("lift-fall.png", "lift-fall"), new fileinfo("lift-jump.png", "lift-jump"), new fileinfo("lift-run.png", "lift-run"), new fileinfo("lift-walk-01.png", "lift-walk-01"), new fileinfo("lift-walk-02.png", "lift-walk-02"), new fileinfo("lift.png", "lift"), new fileinfo("tummy.png", "tummy"), new fileinfo("tummy-hit.png", "tummy-hit"), new fileinfo("tummy-hit-fly.png", "tummy-hit-fly"), new fileinfo("lying.png", "lying"), new fileinfo("lying-hit.png", "lying-hit"), new fileinfo("half-lying.png", "half-lying"), new fileinfo("half-stance.png", "half-stance"), new fileinfo("pull.png", "pull"), new fileinfo("push.png", "push"), new fileinfo("rest-01.png", "rest-01"), new fileinfo("rest-02.png", "rest-02"), new fileinfo("roll-01.png", "roll-01"), new fileinfo("roll-02.png", "roll-02"), new fileinfo("roll-03.png", "roll-03"), new fileinfo("roll-04.png", "roll-04"), new fileinfo("roll-05.png", "roll-05"), new fileinfo("roll-06.png", "roll-06"), new fileinfo("roll-07.png", "roll-07"), new fileinfo("roll-08.png", "roll-08"), new fileinfo("run-01.png", "run-01"), new fileinfo("run-02.png", "run-02"), new fileinfo("run-03.png", "run-03"), new fileinfo("run-04.png", "run-04"), new fileinfo("run-05.png", "run-05"), new fileinfo("run-06.png", "run-06"), new fileinfo("walk-01.png", "walk-01"), new fileinfo("walk-02.png", "walk-02"), new fileinfo("weak-walk.png", "weak-walk"), new fileinfo("ride.png", "ride"), new fileinfo("ride-attack-01.png", "ride-attack-01"), new fileinfo("ride-attack-02.png", "ride-attack-02"), new fileinfo("be-push.png", "be-push"), new fileinfo("sit.png", "sit"), new fileinfo("back-judo-01.png", "back-judo-01"), new fileinfo("back-judo-02.png", "back-judo-02"), new fileinfo("back-judo-03.png", "back-judo-03"), new fileinfo("back-judo-04.png", "back-judo-04"), new fileinfo("back-judo-05.png", "back-judo-05"), new fileinfo("judo-01.png", "judo-01"), new fileinfo("judo-02.png", "judo-02"), new fileinfo("judo-03.png", "judo-03"), new fileinfo("judo-04.png", "judo-04") };

    //	//* 打包资源至 .data 文件 
    //	internal static void GraphRes_WirteToFile(string class_name, fileinfo[] filelist, int n_file, string outputfile)
    //	{
    //		int i;
    //		int class_id;
    //		LCUI_Graph_ graph_buff = new LCUI_Graph_();

    //		GameGraphRes_Init();
    //		class_id = GameGraphRes_AddClass(class_name);
    //		for(i =0; i<n_file; ++i)
    //		{
    //			Graph_Init(graph_buff);
    //			Graph_LoadImage(filelist[i].filepath, graph_buff);
    //			GameGraphRes_AddGraph(class_id, filelist[i].name, graph_buff);
    //		}
    //		GameGraphRes_WriteToFile(outputfile, class_name);
    //		GameGraphRes_FreeAll();
    //	}

    //	//* 解包 .data 文件中的资源 
    //	internal static void ResourceTool_UnPackDataFile(string data_file, string class_name, fileinfo[] list, int n_files)
    //	{
    //		int i;
    //		int dir_code;
    //		LCUI_Graph_ graph_buff = new LCUI_Graph_();
    //		string filepath = new string(new char[512]);
    //		string cmd = new string(new char[256]);

    //		GameGraphRes_Init();
    //		GameGraphRes_LoadFromFile(data_file);
    //	//     
    //	//	 * 类名中会包含一些非法字符，如： : / \ * " ' ? 等符号，目录/文件名不能有这些
    //	//	 * 符号，为了能够正常创建目录，将类名字符串内容转换为数字字符
    //	//	 
    //		dir_code = BKDRHash(class_name);
    //		// 生成所需命令行，以创建文件目录 
    //		cmd = string.Format("mkdir {0:D}", dir_code);
    //		// 执行命令行 
    //		system(cmd);
    //		// 遍历每个图像资源 
    //		for(i =0; i<n_files; ++i)
    //		{
    //			Graph_Init(graph_buff);
    //			// 获取相应名称的图像资源 
    //			GameGraphRes_GetGraph(class_name, list[i].name, graph_buff);
    //			// 生成图像输出文件路径 
    //			filepath = string.Format("{0:D}/{1}", dir_code, list[i].filepath);
    //			// 写入至输出文件 
    //			Graph_WritePNG(filepath, graph_buff);
    //	//C++ TO C# CONVERTER TODO TASK: There is no direct equivalent in C# to the C++ __LINE__ macro:
    //	//C++ TO C# CONVERTER TODO TASK: There is no direct equivalent in C# to the C++ __FILE__ macro:
    //			printf(__FILE__" %d: %s(): ""[%d/%d]: %s\n", __LINE__, System.Reflection.MethodBase.GetCurrentMethod().Name,i, n_files, filepath);
    //		}

    //		GameGraphRes_FreeAll();
    //	}

    //	internal static int Main(int argc, ref string[][] argv)
    //	{
    //	#if TEST
    //		if(argc == 2)
    //		{
    //			test_read();
    //		}
    //		else
    //		{
    //			test_write();
    //		}
    //	//#endif
    //		// 当有两个参数时，解包所有.data文件 
    //		if(argc >= 2)
    //		{
    //			ResourceTool_UnPackDataFile("font.data", DefineConstantsGame_tool.FONT_RES, font_file_info, DefineConstantsGame_tool.FONT_FILE_NUM);
    //			ResourceTool_UnPackDataFile("scenes.data", DefineConstantsGame_tool.SCENES_RES, scenes_file_info, 1);
    //			ResourceTool_UnPackDataFile("main.data", DefineConstantsGame_tool.MAIN_RES, main_file_info, DefineConstantsGame_tool.MAIN_FILE_NUM);
    //			ResourceTool_UnPackDataFile("action-riki.data", DefineConstantsGame_tool.ACTION_RES_CLASS_RIKI, riki_action_file_info, DefineConstantsGame_tool.RIKI_ACTION_FILE_NUM);
    //			ResourceTool_UnPackDataFile("action-ben.data", DefineConstantsGame_tool.ACTION_RES_CLASS_BEN, ben_action_file_info, DefineConstantsGame_tool.BEN_ACTION_FILE_NUM);
    //			ResourceTool_UnPackDataFile("action-toraji.data", DefineConstantsGame_tool.ACTION_RES_CLASS_TORAJI, toraji_action_file_info, DefineConstantsGame_tool.TORAJI_ACTION_FILE_NUM);
    //			ResourceTool_UnPackDataFile("action-kuni.data", DefineConstantsGame_tool.ACTION_RES_CLASS_KUNI, kuni_action_file_info, DefineConstantsGame_tool.KUNI_ACTION_FILE_NUM);
    //			ResourceTool_UnPackDataFile("action-mike.data", DefineConstantsGame_tool.ACTION_RES_CLASS_MIKE, mike_action_file_info, DefineConstantsGame_tool.MIKE_ACTION_FILE_NUM);
    //			return 0;
    //		}
    //		// 不带参数运行本程序时，重新将当前目录下的相应文件打包成.data文件 
    //	#if need_font
    //		GraphRes_WirteToFile(DefineConstantsGame_tool.FONT_RES, font_file_info, DefineConstantsGame_tool.FONT_FILE_NUM, "font.data");
    //	#elif need_main_res
    //		GraphRes_WirteToFile(DefineConstantsGame_tool.MAIN_RES, main_file_info, DefineConstantsGame_tool.MAIN_RES_NUM, "main.data");
    //	#elif need_kuni
    //		GraphRes_WirteToFile(DefineConstantsGame_tool.ACTION_RES_CLASS_KUNI, kuni_action_file_info, DefineConstantsGame_tool.KUNI_ACTION_FILE_NUM, "action-kuni.data");
    //	#elif need_riki
    //		GraphRes_WirteToFile(DefineConstantsGame_tool.ACTION_RES_CLASS_RIKI, riki_action_file_info, DefineConstantsGame_tool.RIKI_ACTION_FILE_NUM, "action-riki.data");
    //	#elif need_toraji
    //		GraphRes_WirteToFile(DefineConstantsGame_tool.ACTION_RES_CLASS_TORAJI, toraji_action_file_info, DefineConstantsGame_tool.TORAJI_ACTION_FILE_NUM, "action-toraji.data");
    //	#elif need_mike
    //		GraphRes_WirteToFile(DefineConstantsGame_tool.ACTION_RES_CLASS_MIKE, mike_action_file_info, DefineConstantsGame_tool.MIKE_ACTION_FILE_NUM, "action-mike.data");
    //	#elif need_ben
    //		GraphRes_WirteToFile(DefineConstantsGame_tool.ACTION_RES_CLASS_BEN, ben_action_file_info, DefineConstantsGame_tool.BEN_ACTION_FILE_NUM, "action-ben.data");
    //	//#endif
    //		return 0;
    //	}
    //}
    //// ****************************************************************************
    ////* Punch And Kick -- a simple 2D Fighting Game.
    ////*
    ////* Copyright (C) 2013 by
    ////* Liu Chao
    ////*
    ////* This file is part of the Punch And Kick project, and may only be used,
    ////* modified, and distributed under the terms of the GPLv2.
    ////*
    ////* (GPLv2 is abbreviation of GNU General Public License Version 2)
    ////*
    ////* By continuing to use, modify, or distribute this file you indicate that you
    ////* have read the license and understand and accept it fully.
    ////*
    ////* The Punch And Kick project is distributed in the hope that it will be
    ////* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 
    ////* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GPL v2 for
    ////* more details.
    ////*
    ////* You should have received a copy of the GPLv2 along with this file. It is
    ////* usually in the LICENSE.TXT file, If not, see <http://www.gnu.org/licenses/>.
    ////* **************************************************************************

    //// ****************************************************************************
    ////* Punch And Kick -- 一个普通的2D格斗游戏
    ////*
    ////* 版权所有 (C) 2013 归属于
    ////* 刘超
    ////*
    ////* 这个文件是 Punch And Kick 项目的一部分，并且只可以根据GPLv2许可协议来使用、
    ////* 更改和发布。
    ////*
    ////* (GPLv2 是 GNU通用公共许可证第二版 的英文缩写)
    ////*
    ////* 继续使用、修改或发布本文件，表明您已经阅读并完全理解和接受这个许可协议。
    ////*
    ////* Punch And Kick 项目是基于技术交流目的而加以散布的，但不负任何担保责任，例
    ////* 如：稳定性、可玩性、趣味性等的担保，甚至没有适销性或特定用途的隐含担保，详
    ////* 情请参照GPLv2许可协议。
    ////*
    ////* 您应已收到附随于本文件的GPLv2许可协议的副本，它通常在LICENSE.TXT文件中，如果
    ////* 没有，请查看：<http://www.gnu.org/licenses/>.
    ////* **************************************************************************

    //// 资源打包/解包工具



    //#define MAIN_RES_NUM

    //#define KUNI_ACTION_FILE_NUM
    //#define RIKI_ACTION_FILE_NUM
    //#define MIKE_ACTION_FILE_NUM
    //#define BEN_ACTION_FILE_NUM
    //#define TORAJI_ACTION_FILE_NUM
    //#define MAIN_FILE_NUM
    //#define FONT_FILE_NUM

    public struct fileinfo
    {
        public string filepath;
        public string name;

        public fileinfo(string v1, string v2) : this()
        {
            this.filepath = v1;
            this.name = v2;
        }
    }

    ////----------------------------------------------------------------------------------------
    ////	Copyright © 2006 - 2009 Tangible Software Solutions Inc.
    ////	This class can be used by anyone provided that the copyright notice remains intact.
    ////
    ////	This class provides the ability to simulate the behavior of the C/C++ functions for 
    ////	generating random numbers, using the .NET Framework System.Random class.
    ////	'rand' converts to the parameterless overload of NextNumber
    ////	'random' converts to the single-parameter overload of NextNumber
    ////	'randomize' converts to the parameterless overload of Seed
    ////	'srand' converts to the single-parameter overload of Seed
    ////----------------------------------------------------------------------------------------
    //internal static class RandomNumbers
    //{
    //	private static System.Random r;

    //	internal static int NextNumber()
    //	{
    //		if (r == null)
    //			Seed();

    //		return r.Next();
    //	}

    //	internal static int NextNumber(int ceiling)
    //	{
    //		if (r == null)
    //			Seed();

    //		return r.Next(ceiling);
    //	}

    //	internal static void Seed()
    //	{
    //		r = new System.Random();
    //	}

    //	internal static void Seed(int seed)
    //	{
    //		r = new System.Random(seed);
    //	}
}